import java.util.Scanner;
public class Elaina_10_7_ti2 {
    private int getGe(int a)
    {
        return a % 10;
    }
    private int getShi(int a)
    {
        return (a/10)%10;
    }
    private int getBai(int a)
    {
        return (a/100)%10;
    }
    public int result(int a)
    {
        return getGe(a) * 100 + getShi(a) * 10 + getBai(a);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Elaina_10_7_ti2 exchange = new Elaina_10_7_ti2();
        System.out.println(exchange.result(n));
    }
}
